home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / TextServices.a < prev    next >
Encoding:
Text File  |  1998-02-12  |  18.0 KB  |  647 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        TextServices.a
  3. ;
  4. ;    Contains:    Text Services Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.1
  8. ;
  9. ;    Copyright:    © 1991-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__TEXTSERVICES__') = 'UNDEFINED' THEN
  19. __TEXTSERVICES__ SET 1
  20.  
  21.     IF &TYPE('__CONDITIONALMACROS__') = 'UNDEFINED' THEN
  22.     include 'ConditionalMacros.a'
  23.     ENDIF
  24.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  25.     include 'MacTypes.a'
  26.     ENDIF
  27.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  28.     include 'Events.a'
  29.     ENDIF
  30.     IF &TYPE('__MENUS__') = 'UNDEFINED' THEN
  31.     include 'Menus.a'
  32.     ENDIF
  33.     IF &TYPE('__AEDATAMODEL__') = 'UNDEFINED' THEN
  34.     include 'AEDataModel.a'
  35.     ENDIF
  36.     IF &TYPE('__AEREGISTRY__') = 'UNDEFINED' THEN
  37.     include 'AERegistry.a'
  38.     ENDIF
  39.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  40.     include 'Components.a'
  41.     ENDIF
  42.  
  43.  
  44. kTextService                    EQU        'tsvc'                ; component type for the component description 
  45. kInputMethodService                EQU        'inpm'                ; component subtype for the component description 
  46. kTSMVersion                        EQU        $0200                ; Version of the Text Services Manager is 2.0  
  47. kTextServiceVersion2            EQU        'tsv2'                ; Interface type for V2 interfaces 
  48. ;  Language and Script constants
  49.  
  50. kUnknownLanguage                EQU        $FFFF
  51. kUnknownScript                    EQU        $FFFF
  52. kNeutralScript                    EQU        $0000FFFF
  53.  
  54. ;  Standard collection tags
  55.  
  56.  
  57. kInteractiveServicesTag            EQU        'tmin'
  58. kLocaleIDTag                    EQU        'loce'
  59. kTextInputObjectTag                EQU        'tiot'
  60. kLocaleObjectRefTag                EQU        'lobj'
  61. kLocaleRefTag                    EQU        'lref'
  62. kKeyboardInputMethodContextTag    EQU        'kinp'
  63. kKeyboardLocaleObjectRefTag        EQU        'kilo'
  64. kHandwritingInputMethodContextTag EQU    'hinp'
  65. kHandwritingLocaleObjectRefTag    EQU        'hilo'
  66. kSpeechInputMethodContextTag    EQU        'sinp'
  67. kSpeechLocaleObjectRefTag        EQU        'silo'
  68. kPasswordModeTag                EQU        'pwdm'
  69. kRefconTag                        EQU        'refc'
  70. kUseFloatingWindowTag            EQU        'uswm'
  71. kReadOnlyDocumentTag            EQU        'isro'
  72. kSupportsMultiInlineHolesTag    EQU        'minl'
  73. kProtocolVersionTag                EQU        'nprt'
  74. kTSMContextCollectionTag        EQU        'tsmx'
  75. ;  Standard tags for input method modes
  76.  
  77.  
  78. kIMRomanInputMode                EQU        'romn'
  79. kIMPasswordInputMode            EQU        'pasw'
  80. kIMXingInputMode                EQU        'xing'
  81. kIMHuaInputMode                    EQU        'huam'
  82. kIMPinyinInputMode                EQU        'piny'
  83. kIMQuweiInputMode                EQU        'quwe'
  84. kIMCangjieInputMode                EQU        'cgji'
  85. kIMJianyiInputMode                EQU        'jnyi'
  86. kIMZhuyinInputMode                EQU        'zhuy'
  87. kIMB5CodeInputMode                EQU        'b5cd'
  88. kIMKatakanaInputMode            EQU        'kata'
  89. kIMHiraganaInputMode            EQU        'hira'
  90. ;  Variant tags for the input modes
  91.  
  92.  
  93. kIM2ByteInputMode                EQU        '2byt'
  94. kIM1ByteInputMode                EQU        '1byt'
  95. kIMDirectInputMode                EQU        'dinp'
  96.  
  97. ;  Text Services LocaleObject Attributes
  98.  
  99.  
  100. kNeedsInputWindow                EQU        1
  101. kHandlesUpdateRegion            EQU        2
  102. kHandlesGetRegion                EQU        3
  103. kHandlesPos2Offset                EQU        4
  104. kHandlesOffset2Pos                EQU        5
  105. kInPasswordMode                    EQU        6
  106. kHandleMultipleHoles            EQU        7
  107. kDocumentIsReadOnly                EQU        8
  108.  
  109.  
  110.                                                             ; Component Flags in ComponentDescription 
  111. bTakeActiveEvent                EQU        15                    ; bit set if the component takes active event 
  112. bHandleAERecording                EQU        16                    ; bit set if the component takes care of recording Apple Events <new in vers2.0> 
  113. bScriptMask                        EQU        $00007F00            ; bit 8 - 14 
  114. bLanguageMask                    EQU        $000000FF            ; bit 0 - 7  
  115. bScriptLanguageMask                EQU        $00007FFF            ; bit 0 - 14  
  116.  
  117.                                                             ; Low level routines which are dispatched directly to the Component Manager 
  118. kCMGetScriptLangSupport            EQU        $0001                ; Component Manager call selector 1 
  119. kCMInitiateTextService            EQU        $0002                ; Component Manager call selector 2 
  120. kCMTerminateTextService            EQU        $0003                ; Component Manager call selector 3 
  121. kCMActivateTextService            EQU        $0004                ; Component Manager call selector 4 
  122. kCMDeactivateTextService        EQU        $0005                ; Component Manager call selector 5 
  123. kCMTextServiceEvent                EQU        $0006                ; Component Manager call selector 6 
  124. kCMGetTextServiceMenu            EQU        $0007                ; Component Manager call selector 7 
  125. kCMTextServiceMenuSelect        EQU        $0008                ; Component Manager call selector 8 
  126. kCMFixTextService                EQU        $0009                ; Component Manager call selector 9 
  127. kCMSetTextServiceCursor            EQU        $000A                ; Component Manager call selector 10 
  128. kCMHidePaletteWindows            EQU        $000B                ; Component Manager call selector 11 
  129.  
  130.  
  131.  
  132.  
  133. ;  New opaque definitions for types
  134.  
  135.  
  136. InterfaceTypeList        RECORD 0
  137. elements                 ds.l    1
  138. sizeof                     EQU *                    ; size:   $4 (4)
  139.                         ENDR
  140.  
  141.  
  142.  
  143. ;  Text Service Info List 
  144. TextServiceInfo            RECORD 0
  145. fComponent                 ds.l    1                ; offset: $0 (0)
  146. fItemName                 ds        Str255            ; offset: $4 (4)
  147. sizeof                     EQU *                    ; size:   $104 (260)
  148.                         ENDR
  149. ; typedef struct TextServiceInfo *        TextServiceInfoPtr
  150.  
  151. TextServiceList            RECORD 0
  152. fTextServiceCount         ds.w    1                ; offset: $0 (0)        ;  number of entries in the 'fServices' array 
  153. fServices                 ds        TextServiceInfo ; offset: $2 (2) <-- really an array of length one ;  Note: array of 'TextServiceInfo' records follows 
  154. sizeof                     EQU *                    ; size:   $106 (262)
  155.                         ENDR
  156. ; typedef struct TextServiceList *        TextServiceListPtr
  157.  
  158. ; typedef TextServiceListPtr *            TextServiceListHandle
  159.  
  160. ScriptLanguageRecord    RECORD 0
  161. fScript                     ds.w    1                ; offset: $0 (0)
  162. fLanguage                 ds.w    1                ; offset: $2 (2)
  163. sizeof                     EQU *                    ; size:   $4 (4)
  164.                         ENDR
  165. ScriptLanguageSupport    RECORD 0
  166. fScriptLanguageCount     ds.w    1                ; offset: $0 (0)        ;  number of entries in the 'fScriptLanguageArray' array 
  167. fScriptLanguageArray     ds        ScriptLanguageRecord ; offset: $2 (2) <-- really an array of length one ;  Note: array of 'ScriptLanguageRecord' records follows 
  168. sizeof                     EQU *                    ; size:   $6 (6)
  169.                         ENDR
  170. ; typedef struct ScriptLanguageSupport * ScriptLanguageSupportPtr
  171.  
  172. ; typedef ScriptLanguageSupportPtr *    ScriptLanguageSupportHandle
  173.  
  174. ;  High level TSM Doucment routines 
  175. ;
  176. ; pascal OSErr NewTSMDocument(short numOfInterface, InterfaceTypeList supportedInterfaceTypes, TSMDocumentID *idocID, long refcon)
  177. ;
  178.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  179.         Macro
  180.         _NewTSMDocument
  181.             moveq               #0,D0
  182.             dc.w                $AA54
  183.         EndM
  184.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  185.         IMPORT_CFM_FUNCTION NewTSMDocument
  186.     ENDIF
  187.  
  188. ;
  189. ; pascal OSErr DeleteTSMDocument(TSMDocumentID idocID)
  190. ;
  191.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  192.         Macro
  193.         _DeleteTSMDocument
  194.             moveq               #1,D0
  195.             dc.w                $AA54
  196.         EndM
  197.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  198.         IMPORT_CFM_FUNCTION DeleteTSMDocument
  199.     ENDIF
  200.  
  201. ;
  202. ; pascal OSErr ActivateTSMDocument(TSMDocumentID idocID)
  203. ;
  204.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  205.         Macro
  206.         _ActivateTSMDocument
  207.             moveq               #2,D0
  208.             dc.w                $AA54
  209.         EndM
  210.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  211.         IMPORT_CFM_FUNCTION ActivateTSMDocument
  212.     ENDIF
  213.  
  214. ;
  215. ; pascal OSErr DeactivateTSMDocument(TSMDocumentID idocID)
  216. ;
  217.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  218.         Macro
  219.         _DeactivateTSMDocument
  220.             moveq               #3,D0
  221.             dc.w                $AA54
  222.         EndM
  223.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  224.         IMPORT_CFM_FUNCTION DeactivateTSMDocument
  225.     ENDIF
  226.  
  227. ;
  228. ; pascal Boolean SetTSMCursor(Point mousePos)
  229. ;
  230.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  231.         Macro
  232.         _SetTSMCursor
  233.             moveq               #6,D0
  234.             dc.w                $AA54
  235.         EndM
  236.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  237.         IMPORT_CFM_FUNCTION SetTSMCursor
  238.     ENDIF
  239.  
  240. ;
  241. ; pascal OSErr FixTSMDocument(TSMDocumentID idocID)
  242. ;
  243.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  244.         Macro
  245.         _FixTSMDocument
  246.             moveq               #7,D0
  247.             dc.w                $AA54
  248.         EndM
  249.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  250.         IMPORT_CFM_FUNCTION FixTSMDocument
  251.     ENDIF
  252.  
  253. ;  Utilities 
  254. ;
  255. ; pascal OSErr UseInputWindow(TSMDocumentID idocID, Boolean useWindow)
  256. ;
  257.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  258.         Macro
  259.         _UseInputWindow
  260.             moveq               #16,D0
  261.             dc.w                $AA54
  262.         EndM
  263.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  264.         IMPORT_CFM_FUNCTION UseInputWindow
  265.     ENDIF
  266.  
  267. ;
  268. ; pascal Boolean TSMEvent(EventRecord *event)
  269. ;
  270.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  271.         Macro
  272.         _TSMEvent
  273.             moveq               #4,D0
  274.             dc.w                $AA54
  275.         EndM
  276.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  277.         IMPORT_CFM_FUNCTION TSMEvent
  278.     ENDIF
  279.  
  280. ;
  281. ; pascal Boolean TSMMenuSelect(long menuResult)
  282. ;
  283.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  284.         Macro
  285.         _TSMMenuSelect
  286.             moveq               #5,D0
  287.             dc.w                $AA54
  288.         EndM
  289.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  290.         IMPORT_CFM_FUNCTION TSMMenuSelect
  291.     ENDIF
  292.  
  293. ;
  294. ; pascal OSErr InitTSMAwareApplication(void )
  295. ;
  296.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  297.         Macro
  298.         _InitTSMAwareApplication
  299.             moveq               #20,D0
  300.             dc.w                $AA54
  301.         EndM
  302.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  303.         IMPORT_CFM_FUNCTION InitTSMAwareApplication
  304.     ENDIF
  305.  
  306. ;
  307. ; pascal OSErr CloseTSMAwareApplication(void )
  308. ;
  309.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  310.         Macro
  311.         _CloseTSMAwareApplication
  312.             moveq               #21,D0
  313.             dc.w                $AA54
  314.         EndM
  315.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  316.         IMPORT_CFM_FUNCTION CloseTSMAwareApplication
  317.     ENDIF
  318.  
  319. ;  Redundant Utilities 
  320. ;
  321. ; pascal OSErr SendAEFromTSMComponent(const AppleEvent *theAppleEvent, AppleEvent *reply, AESendMode sendMode, AESendPriority sendPriority, long timeOutInTicks, AEIdleUPP idleProc, AEFilterUPP filterProc)
  322. ;
  323.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  324.         Macro
  325.         _SendAEFromTSMComponent
  326.             moveq               #11,D0
  327.             dc.w                $AA54
  328.         EndM
  329.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  330.         IMPORT_CFM_FUNCTION SendAEFromTSMComponent
  331.     ENDIF
  332.  
  333. ;
  334. ; pascal OSErr NewServiceWindow(void *wStorage, const Rect *boundsRect, ConstStr255Param title, Boolean visible, short theProc, WindowPtr behind, Boolean goAwayFlag, ComponentInstance ts, WindowPtr *window)
  335. ;
  336.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  337.         Macro
  338.         _NewServiceWindow
  339.             moveq               #17,D0
  340.             dc.w                $AA54
  341.         EndM
  342.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  343.         IMPORT_CFM_FUNCTION NewServiceWindow
  344.     ENDIF
  345.  
  346. ;
  347. ; pascal OSErr NewCServiceWindow(void *wStorage, const Rect *boundsRect, ConstStr255Param title, Boolean visible, short theProc, WindowPtr behind, Boolean goAwayFlag, ComponentInstance ts, WindowPtr *window)
  348. ;
  349.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  350.         Macro
  351.         _NewCServiceWindow
  352.             moveq               #26,D0
  353.             dc.w                $AA54
  354.         EndM
  355.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  356.         IMPORT_CFM_FUNCTION NewCServiceWindow
  357.     ENDIF
  358.  
  359. ;
  360. ; pascal OSErr CloseServiceWindow(WindowPtr window)
  361. ;
  362.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  363.         Macro
  364.         _CloseServiceWindow
  365.             moveq               #18,D0
  366.             dc.w                $AA54
  367.         EndM
  368.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  369.         IMPORT_CFM_FUNCTION CloseServiceWindow
  370.     ENDIF
  371.  
  372. ;
  373. ; pascal OSErr GetFrontServiceWindow(WindowPtr *window)
  374. ;
  375.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  376.         Macro
  377.         _GetFrontServiceWindow
  378.             moveq               #19,D0
  379.             dc.w                $AA54
  380.         EndM
  381.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  382.         IMPORT_CFM_FUNCTION GetFrontServiceWindow
  383.     ENDIF
  384.  
  385. ;
  386. ; pascal short FindServiceWindow(Point thePoint, WindowPtr *theWindow)
  387. ;
  388.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  389.         Macro
  390.         _FindServiceWindow
  391.             moveq               #23,D0
  392.             dc.w                $AA54
  393.         EndM
  394.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  395.         IMPORT_CFM_FUNCTION FindServiceWindow
  396.     ENDIF
  397.  
  398. ;
  399. ; pascal OSErr SetDefaultInputMethod(Component ts, ScriptLanguageRecord *slRecordPtr)
  400. ;
  401.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  402.         Macro
  403.         _SetDefaultInputMethod
  404.             moveq               #12,D0
  405.             dc.w                $AA54
  406.         EndM
  407.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  408.         IMPORT_CFM_FUNCTION SetDefaultInputMethod
  409.     ENDIF
  410.  
  411. ;
  412. ; pascal OSErr GetDefaultInputMethod(Component *ts, ScriptLanguageRecord *slRecordPtr)
  413. ;
  414.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  415.         Macro
  416.         _GetDefaultInputMethod
  417.             moveq               #13,D0
  418.             dc.w                $AA54
  419.         EndM
  420.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  421.         IMPORT_CFM_FUNCTION GetDefaultInputMethod
  422.     ENDIF
  423.  
  424. ;
  425. ; pascal OSErr SetTextServiceLanguage(ScriptLanguageRecord *slRecordPtr)
  426. ;
  427.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  428.         Macro
  429.         _SetTextServiceLanguage
  430.             moveq               #14,D0
  431.             dc.w                $AA54
  432.         EndM
  433.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  434.         IMPORT_CFM_FUNCTION SetTextServiceLanguage
  435.     ENDIF
  436.  
  437. ;
  438. ; pascal OSErr GetTextServiceLanguage(ScriptLanguageRecord *slRecordPtr)
  439. ;
  440.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  441.         Macro
  442.         _GetTextServiceLanguage
  443.             moveq               #15,D0
  444.             dc.w                $AA54
  445.         EndM
  446.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  447.         IMPORT_CFM_FUNCTION GetTextServiceLanguage
  448.     ENDIF
  449.  
  450. ;  Component Manager Interfaces to Input Methods 
  451. ;
  452. ; pascal ComponentResult GetScriptLanguageSupport(ComponentInstance ts, ScriptLanguageSupportHandle *scriptHdl)
  453. ;
  454.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  455.         Macro
  456.         _GetScriptLanguageSupport
  457.             move.l              #$00040001,-(sp)
  458.             moveq               #0,D0
  459.             dc.w                $A82A
  460.         EndM
  461.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  462.         IMPORT_CFM_FUNCTION GetScriptLanguageSupport
  463.     ENDIF
  464.  
  465. ;
  466. ; pascal ComponentResult InitiateTextService(ComponentInstance ts)
  467. ;
  468.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  469.         Macro
  470.         _InitiateTextService
  471.             move.l              #$00000002,-(sp)
  472.             moveq               #0,D0
  473.             dc.w                $A82A
  474.         EndM
  475.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  476.         IMPORT_CFM_FUNCTION InitiateTextService
  477.     ENDIF
  478.  
  479. ;
  480. ; pascal ComponentResult TerminateTextService(ComponentInstance ts)
  481. ;
  482.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  483.         Macro
  484.         _TerminateTextService
  485.             move.l              #$00000003,-(sp)
  486.             moveq               #0,D0
  487.             dc.w                $A82A
  488.         EndM
  489.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  490.         IMPORT_CFM_FUNCTION TerminateTextService
  491.     ENDIF
  492.  
  493. ;
  494. ; pascal ComponentResult ActivateTextService(ComponentInstance ts)
  495. ;
  496.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  497.         Macro
  498.         _ActivateTextService
  499.             move.l              #$00000004,-(sp)
  500.             moveq               #0,D0
  501.             dc.w                $A82A
  502.         EndM
  503.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  504.         IMPORT_CFM_FUNCTION ActivateTextService
  505.     ENDIF
  506.  
  507. ;
  508. ; pascal ComponentResult DeactivateTextService(ComponentInstance ts)
  509. ;
  510.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  511.         Macro
  512.         _DeactivateTextService
  513.             move.l              #$00000005,-(sp)
  514.             moveq               #0,D0
  515.             dc.w                $A82A
  516.         EndM
  517.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  518.         IMPORT_CFM_FUNCTION DeactivateTextService
  519.     ENDIF
  520.  
  521. ;
  522. ; pascal ComponentResult TextServiceEvent(ComponentInstance ts, short numOfEvents, EventRecord *event)
  523. ;
  524.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  525.         Macro
  526.         _TextServiceEvent
  527.             move.l              #$00060006,-(sp)
  528.             moveq               #0,D0
  529.             dc.w                $A82A
  530.         EndM
  531.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  532.         IMPORT_CFM_FUNCTION TextServiceEvent
  533.     ENDIF
  534.  
  535. ;
  536. ; pascal ComponentResult GetTextServiceMenu(ComponentInstance ts, MenuHandle *serviceMenu)
  537. ;
  538.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  539.         Macro
  540.         _GetTextServiceMenu
  541.             move.l              #$00040007,-(sp)
  542.             moveq               #0,D0
  543.             dc.w                $A82A
  544.         EndM
  545.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  546.         IMPORT_CFM_FUNCTION GetTextServiceMenu
  547.     ENDIF
  548.  
  549. ;
  550. ; pascal ComponentResult TextServiceMenuSelect(ComponentInstance ts, MenuHandle serviceMenu, short item)
  551. ;
  552.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  553.         Macro
  554.         _TextServiceMenuSelect
  555.             move.l              #$00060008,-(sp)
  556.             moveq               #0,D0
  557.             dc.w                $A82A
  558.         EndM
  559.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  560.         IMPORT_CFM_FUNCTION TextServiceMenuSelect
  561.     ENDIF
  562.  
  563. ;
  564. ; pascal ComponentResult FixTextService(ComponentInstance ts)
  565. ;
  566.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  567.         Macro
  568.         _FixTextService
  569.             move.l              #$00000009,-(sp)
  570.             moveq               #0,D0
  571.             dc.w                $A82A
  572.         EndM
  573.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  574.         IMPORT_CFM_FUNCTION FixTextService
  575.     ENDIF
  576.  
  577. ;
  578. ; pascal ComponentResult SetTextServiceCursor(ComponentInstance ts, Point mousePos)
  579. ;
  580.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  581.         Macro
  582.         _SetTextServiceCursor
  583.             move.l              #$0004000A,-(sp)
  584.             moveq               #0,D0
  585.             dc.w                $A82A
  586.         EndM
  587.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  588.         IMPORT_CFM_FUNCTION SetTextServiceCursor
  589.     ENDIF
  590.  
  591. ;
  592. ; pascal ComponentResult HidePaletteWindows(ComponentInstance ts)
  593. ;
  594.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  595.         Macro
  596.         _HidePaletteWindows
  597.             move.l              #$0000000B,-(sp)
  598.             moveq               #0,D0
  599.             dc.w                $A82A
  600.         EndM
  601.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  602.         IMPORT_CFM_FUNCTION HidePaletteWindows
  603.     ENDIF
  604.  
  605. ;
  606. ; pascal OSErr GetServiceList(short numOfInterface, OSType *supportedInterfaceTypes, TextServiceListHandle *serviceInfo, long *seedValue)
  607. ;
  608.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  609.         Macro
  610.         _GetServiceList
  611.             moveq               #8,D0
  612.             dc.w                $AA54
  613.         EndM
  614.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  615.         IMPORT_CFM_FUNCTION GetServiceList
  616.     ENDIF
  617.  
  618. ;
  619. ; pascal OSErr OpenTextService(TSMDocumentID idocID, Component aComponent, ComponentInstance *aComponentInstance)
  620. ;
  621.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  622.         Macro
  623.         _OpenTextService
  624.             moveq               #9,D0
  625.             dc.w                $AA54
  626.         EndM
  627.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  628.         IMPORT_CFM_FUNCTION OpenTextService
  629.     ENDIF
  630.  
  631. ;
  632. ; pascal OSErr CloseTextService(TSMDocumentID idocID, ComponentInstance aComponentInstance)
  633. ;
  634.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  635.         Macro
  636.         _CloseTextService
  637.             moveq               #10,D0
  638.             dc.w                $AA54
  639.         EndM
  640.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  641.         IMPORT_CFM_FUNCTION CloseTextService
  642.     ENDIF
  643.  
  644.  
  645.     ENDIF ; __TEXTSERVICES__ 
  646.  
  647.